<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page import="blog1.articleDAO" %>
<%@ page import="blog1.article" %>  
<%@ page import= "java.util.ArrayList" %> 
<%@ page import="java.util.Date"%>
<%@ page import="java.text.SimpleDateFormat"%>
<html>
<head>
<title>首页</title>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<LINK rel="Bookmark" href="favicon.ico" >
<LINK rel="Shortcut Icon" href="favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="/staticRes/js/html5shiv.js"></script>
<script type="text/javascript" src="/staticRes/js/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="plugin/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="plugin/Hui-iconfont/1.0.8/iconfont.min.css" />
<link rel="stylesheet" type="text/css" href="css/common.css" />
<link rel="stylesheet" type="text/css" href="plugin/pifu/pifu.css" />
<!--[if lt IE 9]>
<link href="/staticRes/lib/h-ui/css/H-ui.ie.css" rel="stylesheet" type="text/css" />
<![endif]-->
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } function showSide(){$('.navbar-nav').toggle();}</script>
</head>
<body>
<header class="navbar-wrapper">
    <div class="navbar navbar-fixed-top">
        <div class="container cl">
            <a class="navbar-logo hidden-xs" href="index.jsp">
                <img class="logo" src="img/one.png" alt="我的博客" />
            </a>
            <a class="logo navbar-logo-m visible-xs" href="/"></a>
            <a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:void(0);" onclick="showSide();">&#xe667;</a>
            <nav class="nav navbar-nav nav-collapse w_menu" role="navigation">
                <ul class="cl">
                    <li class="active"> <a href="index.jsp" data-hover="首页">首页</a> </li>
                    <li> <a href="about.jsp" data-hover="关于博主">关于博主</a> </li>
                    <li> <a href="write.jsp" data-hover="撰写博文">撰写博文</a> </li>
                    <li><a href="article.jsp" data-hover="博文一览">博文一览</a></li>
                    <li> <a href="board.jsp" data-hover="留言板">留言板</a> </li>
                </ul>
            </nav>
            <nav class="navbar-nav navbar-userbar hidden-xs hidden-sm " style="top: 0;">
                <ul class="cl">
                    <li class="userInfo dropDown dropDown_hover">
                            <!--<a href="javascript:;" ><img class="avatar radius" src="http://q.qlogo.cn/qqapp/101388738/1CF8425D24660DB8C3EBB76C03D95F35/40" alt="丶似浅 "></a>
                            <ul class="dropDown-menu menu radius box-shadow">
                                <li><a href="/app/loginOut">退出</a></li>
                            </ul>-->
                    </li>
                </ul>
            </nav>
        </div>
    </div>
</header>

<section class="container pt-20">
	<!--<div class="Huialert Huialert-info"><i class="Hui-iconfont">&#xe6a6;</i>成功状态提示</div>-->
  <!--left-->
  <div class="col-sm-9 col-md-9">
  	<!--滚动图-->
  	<div class="slider_main">
            <div class="slider">
                <div class="bd">
                    <ul>
                        <li><a href="https://baike.baidu.com/item/%E6%A2%A6%E5%88%9B%E4%BF%A1%E6%81%AF%EF%BC%88%E5%A4%A7%E8%BF%9E%EF%BC%89%E6%9C%89%E9%99%90%E5%85%AC%E5%8F%B8/3958038?fr=aladdin" target="_blank"><img src="img/temp/1.jpg"></a></li>
                        <li><a href="http://ssdut.dlut.edu.cn/" target="_blank"><img src="img/temp/timg.jpg"></a></li>
                        <li><a href="http://www.dlut.edu.cn/" target="_blank"><img src="img/temp/3.jpg"></a></li>
                    </ul>
                </div>
                <ol class="hd cl dots">
                    <li>1</li>
                    <li>2</li>
                    <li>3</li>
                </ol>
                <a class="slider-arrow prev" href="javascript:void(0)"></a>
                <a class="slider-arrow next" href="javascript:void(0)"></a>
                <a class="slider-arrow next" href="javascript:void(0)"></a>
            </div>
        </div>

		<div class="mt-20 bg-fff box-shadow radius mb-5">
			<div class="tab-category">
				<a href=""><strong class="current">最新发布</strong></a>
			</div>
		</div>
		<div class="art_content">
			<ul class="index_arc">

				<%
	               	articleDAO articledao=new articleDAO(); 
					ArrayList <article> list4= articledao.getAllarticle(); 
					if(list4!=null && list4.size()>0)
					{
						int flag=0;
						if(list4.size()>5)
						{
							flag=5;
						}
						else
						{
							flag=list4.size();
						}
						for(int i=list4.size()-1;i>=list4.size()-flag;i--)
						{ 
							article artic=list4.get(i);
               
               %>
               <%
	               String outline=artic.getArticleName();
	               String passage=artic.getArticleContent();
	               String passageGood=Integer.toString(artic.getArticleGood());
	               String passageDate=artic.getArticleDate();
	               String passageTime=artic.getArticleTime();
               %>
				<li class="index_arc_item no_pic">
                <h4 class="title"><a href="article_detail.jsp?outline=<%=outline%>&passage=<%=passage%>&passageGood=<%=passageGood %>&date=<%=passageDate%>&time=<%=passageTime %>"><%=outline %></a></h4>
					<div class="date_hits">
						<span>连理</span>
						<span><%=passageDate %>&nbsp&nbsp&nbsp<%=passageTime %></span>
						<span><a href="#">程序人生</a></span>
						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> <%=passageGood %> °</p>
						<p class="commonts"><i class="Hui-iconfont" title="点击量">&#xe622;</i> <span id="sourceId::105" class="cy_cmt_count">20</span></p>
					</div>
					<div class="desc"> <%=passage %></div>
				</li>
                <li class="index_arc_item">
	            <a href="/article/4" class="pic">
	                <img class="lazyload" data-original="temp/art.jpg" alt="centos 6.5 nginx安装及配置" >
	            </a>
                <h4 class="title"><a href="article_detail.jsp?outline=<%=outline%>&passage=<%=passage%>&passageGood=<%=passageGood %>&date=<%=passageDate%>&time=<%=passageTime %>"><%=outline %></a></h4>
	        <div class="date_hits">
	            <span>连理</span>
	            <span><%=passageDate %>&nbsp&nbsp&nbsp<%=passageTime %></span>
	            <span>
	                <a href="/article?t=1">程序人生</a>
	            </span>
	            <p class="hits"><i class="Hui-iconfont" title="点击量"></i> <%=passageGood%>° </p>
	            <p class="commonts"><i class="Hui-iconfont" title="评论"></i> <span class="cy_cmt_count">0</span></p>
	        </div>
	        <div class="desc"><%=passage%></div>
	    </li>
                 <%
                       }
                     }
                 %> 
				
				</ul>
				
				</ul>
  		<div class="text-c mb-20" id="moreBlog">
	        <a class="btn  radius btn-block " href="javascript:;" onclick="moreBlog();">点击加载更多</a>
	        <a class="btn  radius btn-block hidden" href="javascript:;">加载中……</a>
	    </div>
		</div>
  </div>

  <!--right-->
  <div class="col-sm-3 col-md-3">

  	<!--站点声明-->
        <div class="panel panel-default mb-20">
            <div class="panel-body">
                <i class="Hui-iconfont" style="float: left;">&#xe62f;&nbsp;</i>
                <div class="slideTxtBox">
                    <div class="bd">
                        <ul>
                            <li><a href="javascript:void(0);">梦创实习第一天</a></li>
                            <li><a href="javascript:void(0);">梦创实习第二天</a></li>
                            <li><a href="javascript:void(0);">梦创实习第三天</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>

  	<!--博主信息-->
        <div class="bg-fff box-shadow radius mb-20">
            <div class="tab-category">
                <a href=""><strong>博主信息</strong></a>
            </div>
            <div class="tab-category-item">
                <ul class="index_recd">
                    <li class="index_recd_item"><i class="Hui-iconfont">&#xe653;</i>姓名：大连理工梦创暑期研修小组</li>
                    <li class="index_recd_item"><i class="Hui-iconfont">&#xe70d;</i>职业：学生</li>
                    <li class="index_recd_item"><i class="Hui-iconfont">&#xe63b;</i>邮箱：666666@dlut.edu.cn</li>
                    <li class="index_recd_item"><i class="Hui-iconfont">&#xe671;</i>定位：辽宁 &middot; 大连</li>
                </ul>
            </div>
        </div>


  	<!--热门推荐-->
  	<div class="bg-fff box-shadow radius mb-20">
			<div class="tab-category">
				<a href=""><strong>热门推荐</strong></a>
			</div>
			<div class="tab-category-item">
				<ul class="index_recd">
					<li>
						<a href="#">让你失望了地震云并不存在</a>
						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe622;</i> 666 </p>
					</li>
					<li >
						<a href="#">从「朋友圈三天可见」分析背后隐含的设计原因</a>
						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe622;</i> 666 </p>
					</li>
					<li >
						<a href="#">搜狗发布“搜狗听写”速记工具以后写文章动嘴就行了</a>
						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe622;</i> 666 </p>
					</li>
					<li >
						<a href="#">真正赚钱的人都没有你想象的那么辛苦</a>
						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe622;</i> 666 </p>
					</li>
					<li >
						<a href="#">数据大战在即，谁来保护消费者的隐私权？</a>
						<p class="hits"><i class="Hui-iconfont" title="点击量">&#xe622;</i> 666 </p>
					</li>
				</ul>
			</div>
		</div>

		<!--点击排行-->
        <div class="bg-fff box-shadow radius mb-20">
            <div class="tab-category">
                <a href=""><strong>点击排行</strong></a>
            </div>
            <div class="tab-category-item">
                <ul class="index_recd clickTop">
                    <li>
                        <a href="#">The miser and his gold</a>
                        <p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> 276° </p>
                    </li>
                    <li>
                        <a href="#">A Bad Day at Work</a>
                        <p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> 276° </p>
                    </li>
                    <li>
                        <a href="#">日报&陈卓</a>
                        <p class="hits"><i class="Hui-iconfont" title="点击量">&#xe6c1;</i> 276° </p>
                    </li>
                    
                </ul>
            </div>
        </div>
  </div>

</section>
<footer class="footer mt-20">
    <div class="container-fluid" id="foot">
        <p>大连梦创信息<br>
            大连理工大学暑期研修小组
        </p>
    </div>
</footer>
<script type="text/javascript" src="plugin/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="plugin/layer/3.0/layer.js"></script>
<script type="text/javascript" src="plugin/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<script> $(function(){ $(window).on("scroll",backToTopFun); backToTopFun(); }); </script>
<script type="text/javascript" src="plugin/jquery.SuperSlide/2.1.1/jquery.SuperSlide.min.js"></script>

<script>
$(function(){
//幻灯片
jQuery(".slider_main .slider").slide({mainCell: ".bd ul", titCell: ".hd li", trigger: "mouseover", effect: "leftLoop", autoPlay: true, delayTime: 700, interTime: 2000, pnLoop: true, titOnClassName: "active"})
//tips
jQuery(".slideTxtBox").slide({titCell: ".hd ul", mainCell: ".bd ul", autoPage: true, effect: "top", autoPlay: true});
//标签
	$(".tags a").each(function(){
		var x = 9;
		var y = 0;
		var rand = parseInt(Math.random() * (x - y + 1) + y);
		$(this).addClass("tags"+rand)
	});

	$("img.lazyload").lazyload({failurelimit : 3});
});

</script>

</body>
</html>